@model IEnumerable<SeventhSenseSystems.HighFlyingPm.Business.Entities.Issue>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th></th>
        <th>
            Subject
        </th>
        <th>
            IssueStatuseId
        </th>
        <th>
            AssingedToId
        </th>
        <th>
            IssueStatus
        </th>
        <th>
            Project
        </th>
        <th>
            Author
        </th>
        <th>
            AssignedTo
        </th>
        <th>
            Tracker
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
        <td>
			@item.Subject
        </td>
        <td>
			@item.IssueStatuseId
        </td>
        <td>
			@item.AssingedToId
        </td>
        <td>
			@(item.IssueStatus == null ? "None" : item.IssueStatus.Name)
        </td>
        <td>
			@(item.Project == null ? "None" : item.Project.Name)
        </td>
        <td>
			@(item.Author == null ? "None" : item.Author.LastName)
        </td>
        <td>
			@(item.AssignedTo == null ? "None" : item.AssignedTo.LastName)
        </td>
        <td>
			@(item.Tracker == null ? "None" : item.Tracker.Name)
        </td>
    </tr>
}

</table>


